using System;
using System.Data;
using System.Data.SqlClient; 

/// <summary>
/// Summary description for SqlServerTransaction
/// </summary>
public partial class DataProvider
{

    #region	 ExecuteNonQuery
    public int ExecuteNonQuery()
    {
        InitParameters();
        // return number of row affected
        int rows = sqlCommand.ExecuteNonQuery();

        if (returnValueParameter != "")
            returnValue = Convert.ToInt32(
            sqlCommand.Parameters[
            returnValueParameter].Value);
            
        sqlCommand.Dispose();
        return rows;

    }
     
    #endregion

    #region ExecuteScalar
    public object ExecuteScalar()
    {
        InitParameters(); 
        object obj = sqlCommand.ExecuteScalar();

        if (returnValueParameter != "")
            returnValue = Convert.ToInt32(
            sqlCommand.Parameters[
            returnValueParameter].Value);
            
        sqlCommand.Dispose();
        return obj;
    }
     
     
    #endregion
    
}
 